(function() {

    var
    $u = juliet.using({
        Autocomplete : 'juliet.ui.input.withPopupList.autocomplete.Autocomplete-0.1',
        DropDownSelect : 'juliet.ui.input.withPopupList.DropDownSelect-0.1'
    }),
    $ = juliet.jQuery;

    function initialize() {
        var typeSelect = juliet.createObject($u('DropDownSelect'), { selector : '#drop-down-select' });

        typeSelect.setData({
            data : [ { title : '1', value : '1' } ],
            titlePropertyName : 'title',
            valuePropertyName : 'enumValue'
        });

        typeSelect.setSelectedItem({ title : '1', value : '1' });

        var autocomplete = juliet.createObject($u('Autocomplete'), {
            selector : '#autocomplete',
            url : 'http://orangedesk.ru/rest/jersey/city-service/get-by-prefix/'
        });
    }

    $(document).ready(function() {
        initialize();
    });

})();
